import { createSSRApp } from "vue"
import App from "./App.vue"
import pinia from "./stores"
import { i18n } from "./locale"
import mountedComponent from "./plugins/mountedComponent"
import '@/styles/index.scss'

export function createApp() {
  const app = createSSRApp(App)

  app
    .use(pinia)
    .use(i18n)
    .use(mountedComponent)

  uni.on = uni.$on
  uni.once = uni.$once
  uni.emit = uni.$emit
  uni.off = uni.$off

  return {
    app,
  }
}
